package com.frxuexi.lib_base.db

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
import com.frxuexi.lib_base.entity.Comment
import com.frxuexi.lib_base.entity.CommentBean
import com.frxuexi.lib_base.entity.CommentBeanItem
import com.frxuexi.lib_base.entity.UserEntity
import com.frxuexi.lib_base.entity.VideoZanBean

@Dao
interface ZanDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun addZan(bean: VideoZanBean):Long


    @Query("select count(*) from zan where videoId=:videoId")
    fun getZan(videoId:Int?):Int

    @Delete
    fun deleteZan(bean: VideoZanBean):Int

}